package com.kantboot.business.talent.repository;

import com.kantboot.business.talent.domain.simple.UserAccountSimple;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface UserAccountSimpleRepository extends JpaRepository<UserAccountSimple,Long> {

    @Query("""
            SELECT
                COUNT(1)
            FROM
                UserAccountSimple
            WHERE
                phoneAreaCode = :phoneAreaCode 
                AND phone = :phone
            """)
    int countByPhoneAreaCodeAndPhone(String phoneAreaCode, String phone);

}
